<template>
   <h1>欢迎来到登录页面</h1>
   <el-button @click="goHome" type='primary'>回首页</el-button>
</template>

<script setup>

const router = useRouter()

const goHome = () => {
   router.push("/welcome")
}

const { proxy } = getCurrentInstance()

const $request = proxy.$request
$request({
   method: "get", 
   url: "/login",
   data: {
      aaa: "bbb"
   }
}).then(res => {
   console.log(res);
})


const $storage = proxy.$storage
onMounted(() => {
   // $storage.setItem("age", 30)
   // console.log("user =>", $storage.getItem("age"));
   $storage.clearAll()
})


</script>

<style scoped>

</style>
